package com.atguigu.spzx.order.mapper;

import com.atguigu.spzx.order.entity.OrderItem;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * OrderItemMapper
 * </p>
 *
 * @author flyduck
 * @since 2023/11/6
 */
@Mapper
public interface OrderItemMapper extends BaseMapper<OrderItem> {
    default List<OrderItem> getOrderItemListByOrderId(Long orderId){
        QueryWrapper<OrderItem> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("order_id", orderId);
        return this.selectList(queryWrapper);
    }
}
